package com.jmxcfc.blfsc.xuanwu.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PreDestroy;
import java.util.Map;

/**
 * @author pbs
 */
@Configuration
@ConfigurationProperties("xuanwu")
@EnableConfigurationProperties(XuanwuProperties.class)
@Data
public class XuanwuProperties {

    private String account;

    private String password;

    private String ip;

    /**
     * 发送短信的端口 8090
     * mtPool
     */
    private int port;

    /**
     * moserver服务的端口
     * 用于查询玄武短信报告的服务的端口,目前是 8088
     * moPool
     */
    //private int moServerPort;



    private Map<String, Object> bizTypeMap;


    /**
     * 必须加,否则新增可以动态刷新,删除不能
     */
    @PreDestroy
    public void destroy() {
        bizTypeMap = null;
    }
}